package com.base.self.controller;

import com.base.log.LoginAn;
import com.base.result.ResponseResult;
import com.base.self.dto.selfExpress.GetSelfExpressSelectDataDTO;
import com.base.self.service.ISelfExpressService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 自营快递 前端控制器
 * </p>
 *
 * @author XiFYuW
 * @since 2020-11-17
 */
@RestController
@RequestMapping("/admin/selfExpress")
public class SelfExpressController {

    private final ISelfExpressService iSelfExpressService;

    public SelfExpressController(ISelfExpressService iSelfExpressService) {
        this.iSelfExpressService = iSelfExpressService;
    }

    @PostMapping(value = "/getSelfExpressSelectData")
    @Validated
    @LoginAn(isRe = true)
    public ResponseResult getSelfExpressSelectData(@Valid final GetSelfExpressSelectDataDTO getSelfExpressSelectDataDTO) {
        return iSelfExpressService.getSelfExpressSelectData(getSelfExpressSelectDataDTO);
    }
}

